package com.kkw.shoppingmall.product.feign.fallback;

import com.kkw.common.exception.BizCodeEnume;
import com.kkw.common.utils.R;
import com.kkw.shoppingmall.product.feign.SeckillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author Kevin
 * @date 2021-06-29
 **/
@Slf4j
@Component
public class SeckillFeignServiceFallBack implements SeckillFeignService {
    @Override
    public R getSkuSeckillInfo(Long skuId) {
        log.error("熔断方法已经调用{SeckillFeignServiceFallBack}");
        return R.error(BizCodeEnume.TO_MANY_REQUEST.getCode(), BizCodeEnume.TO_MANY_REQUEST.getMsg());
    }
}
